Conversation
A plan is cut once, into what runs ahead of the query and what runs at query time. The backend had four names for the first half and a different word entirely for the second, and neither matched the field names in PhysicalCandidate that Planner hands it. The query half was called `residual`. That word is also Planner's, for something else: ExactWindowEdgeResidual is the exact computation covering the partial panes at a window's two edges, which has nothing to do with this cut. Call it query-time, which is what it is. The precompute half answered to `executable_dags`, InstalledPostAsapDag, `maintenance` in its own validator and schema constant, and RawDagProgram in the engine, while its own binding type already said `precompute_sinks`. Use precompute throughout, matching PhysicalCandidate::precompute. Identifiers and prose only; no serialized value changes. Verified `residual` never appears in a serde rename. Three sites keep the word because they mean something else entirely: `residuals` on a KLL sketch is the sketch's own array, `let residual = a - b - c` in the diagnostic example is arithmetic, and "typed-local-residual-v3-counter-index" in compiler.rs is a hash seed whose bytes feed a stored identity, so renaming it would silently invalidate persisted fingerprints. Lifecycle vocabulary is untouched. "Summary Maintenance Lifecycle" names how state is built, retained, reused and scheduled; a precompute DAG is the physical object a lifecycle compiles to. ASAPPlanner #462 draws the same line upstream, and its design doc and physical-layer comments now say precompute for this half. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A plan is cut once: what runs ahead of the query, and what runs at query time. The backend had four names for the first half and a different word entirely for the second, and neither matched the fields in
PhysicalCandidatethat Planner hands it.PhysicalCandidate)precomputeexecutable_dags,InstalledPostAsapDag,maintenance(validator + schema constant),RawDagProgramprecomputequeryresidualquery_timeWhy
residualhad to goIt is also Planner's word, for something else.
ExactWindowEdgeResidualis the exact computation covering the partial panes at a window's two edges; it has nothing to do with this cut. Two repositories used one word for two concepts.Why
precomputeand notmaintenanceThe crates already separate these by layer, and only the names blurred it:
asap-aware-mapping::summary_maintenance_*owns the Summary Maintenance Lifecycle: how state is built, retained, reused, scheduled.asap-physical-operators::physical_plannerowns the DAGs a lifecycle compiles to, and calls this halfprecompute.The backend's own
BackendExecutableBindingalready saidprecompute_sinks. Lifecycle vocabulary is untouched here.Not renamed, deliberately
Three sites keep the word because they mean something else:
residualson a KLL sketch: the sketch's own array.let residual = a - b - cinsketch_db_diag.rs: arithmetic."typed-local-residual-v3-counter-index"incompiler.rs:1630: a hash seed. Its bytes feed a stored identity, so renaming it would silently invalidate persisted fingerprints.Scope and safety
Identifiers and prose only.
residualnever appears in aserde(rename = ...), so no serialized value changes.23 files, +288 / −277. Rebased onto
mainafter #774 merged, so it covers the shared-operator code too.cargo build -p control_plane -p data_plane,cargo fmt --check,cargo clippy --all-targetswith-D warnings, andcargo test -p control_plane --lib(433 passed) all clean.Upstream
ASAPPlanner #462 draws the same line: its design doc section is now "Precompute Physical DAG" beside "Query Physical DAG", and its physical-layer comments say precompute for this half.
🤖 Generated with Claude Code